package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"zhifubao/api/internal/config"
	"zhifubao/zhifubaorpc/zhifubaorpcclient"
)

type ServiceContext struct {
	Config      config.Config
	ZhifubaoRpc zhifubaorpcclient.Zhifubaorpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:      c,
		ZhifubaoRpc: zhifubaorpcclient.NewZhifubaorpc(zrpc.MustNewClient(c.ZhifubaoRpc)),
	}
}
